<!doctype html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link rel="stylesheet" type="text/css" href="../../css/mui.css"/>
		<link href="../../css/mui.min.css" rel="stylesheet" />
		<link rel="stylesheet" type="text/css" href="../../css/general.css"/>
		<style type="text/css">
			.main{
				width:100%;
				margin: 0.5em 0;
				background-color: white;
			}
			.main{
				padding: 0.5em;
			}
			.main>div:first-child{
				display: flex;
				justify-content: space-between;
				align-items: center;
			}
			.main>div:last-child{
				word-wrap: break-word;
				word-break: break-all;
				padding: 0.5em 0;
			}
		</style>
	</head>

	<body>
		<header class="mui-bar mui-bar-nav hbg">
		    <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left colorw"></a>
		    <h1 class="mui-title">跟进记录</h1>
		    <div class="hicon mui-icon-right-nav mui-pull-right" id="adddiv">
		    	<img src="../../img/add.png"/>
		    </div>
		</header>
		<div class="mui-content">
			<div class="" id="flist">
				
			</div>
		</div>
		<script src="../../js/jquery.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="../../js/mui.min.js"></script>
		<script src="../../js/req.js" type="text/javascript" charset="utf-8"></script>
		<script src="../../js/muishow.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript">
			var mid = 0; //会员id
			window.onload = function(){
				
				mui.init();
				
				mid = getrequest().mid;
				g("adddiv").addEventListener("tap",function(e){
					mui.openWindow({
						url:"addfollow.html?mid="+mid,
						id:"addfollow"
					})
				})
				
				getmember_follow();
				
			}
			
			
			function getmember_follow(){
				
				var data = {
					url:"/api/member_follow_record/lst",
					data:{
						access_token:acctoken(),
						member_id:mid,
					}
				}
				ajax(data,function(res){
					console.log(res);
					
					setmember_follow(res.data.data);
				})
				
			}
			
			function setmember_follow(list){
				var str = '';
				
				if(list&&list.length > 0){
					list.forEach(function(item,index){
						str += '<div class="main"><div class=""><span id="">'+
		    			item.createtime+
		    			'</span><span id="">'+
		    			item.username+
		    			'</span></div><div class=""><span id="">内容：'+
		    			'</span><span id="" class="fe09">'+
		    			item.content+
		    			'</span></div></div>';
					})
				}else{
					
					str += '<div class="nolistdiv">暂无数据</div>'
				}
				
				g("flist").innerHTML = str;
			}
			
			//刷新
			function onshow(){
				getmember_follow();
			}
		</script>
	</body>

</html>